<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<style>
		
	</style>
	<body>
		<div id="app">
			<!-- 驼峰式命名需转换为 '-'连接 -->
			<cpn :c-info='info'></cpn>
		</div>
		
		<template id="cpn">
			<div>
				<h2>{{cInfo}}</h2>
			</div>
		</template>
		
		<script src="../js/vue.js"></script>
		<script>
			const cpn = {
				template: '#cpn',
				data(){
					return {}
				},
				props: {
					cInfo: {
						type: Object,
						default(){
							return {}
						}
					}
				}
			}
			const app = new Vue({
				el: '#app',
				data: {
					info: {
						name: 'roc',
						age: 18,
						height: 180
					}
				},
				components:{
					cpn: cpn
				}
			})
		</script>
	</body>
</html>